package com.yixing.tech.wcs.config;

import com.yixing.tech.wcs.service.ICRUDService;
import com.yixing.tech.wcs.service.TaskNotifyService;
import com.yixing.tech.wcs.service.impl.DefaultTaskNotifyServiceImpl;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author <a href="mailto:brucezhang_jjz@163.com">zhangj</a>
 */
@Configuration
public class WcsConfiguration {

    @Bean
    @ConditionalOnMissingBean(TaskNotifyService.class)
    public TaskNotifyService getTaskNotifyService(ICRUDService crudService) {
        return new DefaultTaskNotifyServiceImpl(crudService);
    }

}
